﻿/*
 * Created by SharpDevelop.
 * User: kat
 * Date: 11/27/2011
 * Time: 4:23 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using Business_Logic;


namespace PetSoft.GUI.Seguridad
{
	/// <summary>
	/// Description of GUIMenuSeg.
	/// </summary>
	public partial class GUIMenuSeg : Form
	{
		public GUIMenuSeg()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			BLPrivilegio blpriv = new BLPrivilegio();
			
			if (!blpriv.existeVentana("SEGU","USUA",BLInfo.usuarioActual.Rol.Privilegio))
					this.button4.Enabled = false;
			if (!blpriv.existeVentana("SEGU","USUC",BLInfo.usuarioActual.Rol.Privilegio))
            		this.button5.Enabled = false;
            if (!blpriv.existeVentana("SEGU","ROLE",BLInfo.usuarioActual.Rol.Privilegio))
            		this.button6.Enabled = false; 
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void Button1Click(object sender, EventArgs e)
		{
		}
		
		void GUIMenuGGRRLoad(object sender, EventArgs e)
		{
			
		}
		
		void Button7Click(object sender, EventArgs e)
		{
			this.Close();
		}
		
		void Button2Click(object sender, EventArgs e)
		{
		
		}
		
		void Button3Click(object sender, EventArgs e)
		{
		
		}
		
		void Button4Click(object sender, EventArgs e)
		{
            GUIBuscarCliente buscarC = new GUIBuscarCliente();
            buscarC.ShowDialog();
		}
		
		void Button5Click(object sender, EventArgs e)
		{
            GUIBuscarUsuario buscarU = new GUIBuscarUsuario();
            buscarU.ShowDialog();
		}
		
		void Button6Click(object sender, EventArgs e)
		{
            GUIBuscarRoles buscarR = new GUIBuscarRoles(true);
            buscarR.ShowDialog();
		}
	}
}
